//
//  LPTAopenpretionTableViewCell.m
//  LPTClient
//
//  Created by mac on 2018/12/4.
//  Copyright © 2018年 zhaodd. All rights reserved.
//

#import "LPTAopenpretionTableViewCell.h"

@interface LPTAopenpretionTableViewCell ()

@property (weak, nonatomic) IBOutlet UILabel *dateLabel;
@property (weak, nonatomic) IBOutlet UILabel *orderNumLabel;
@property (weak, nonatomic) IBOutlet UILabel *huanzheName;
@property (weak, nonatomic) IBOutlet UILabel *huanzhePhone;
@property (weak, nonatomic) IBOutlet UILabel *zhengduanResult;//诊断结果
@property (weak, nonatomic) IBOutlet UILabel *priceLabel;


@end

@implementation LPTAopenpretionTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

-(void)refreshWithPrescriptionEntity:(LPTPrescriptionsEntity *)entity
{
    self.dateLabel.text = [NSString stringWithFormat:@"问诊时间：%@",entity.user.created_at];
    self.orderNumLabel.text = [NSString stringWithFormat:@"问诊单号：%@",entity.order.no?:@""];
    self.huanzheName.text = [NSString stringWithFormat:@"患者姓名：%@",entity.user.name];
    self.huanzhePhone.text = [NSString stringWithFormat:@"患者手机：%@",entity.user.mobile];
    self.zhengduanResult.text = [NSString stringWithFormat:@"诊断结果：%@",entity.diagnosis];
    
    if (entity.order.amount) {
        
        self.priceLabel.text = [NSString stringWithFormat:@"¥%@",entity.order.amount];
    }else{
        self.priceLabel.text = @"";
    }
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
